Skip to content

Match Cartesian axes with identical invisible reference #4506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Jan 23, 2020

Fixes #4501.

Demos:

@alexcjohnson
cc: @nicolaskruchten @plotly/plotly_js

@archmoj archmoj added bug something broken status: reviewable labels Jan 23, 2020
@nicolaskruchten
Copy link
Contributor

Does this PR check to make sure that the new matches target is a valid one with traces? Or if not, do all references get cleaned up? For example if x2, x3, x4, x5 are all matching x and x is invalid and we make them all point to x2 but then x2 is invalid also do we then match them all to x3?

@archmoj
Copy link
Contributor Author

archmoj commented Jan 23, 2020

Does this PR check to make sure that the new matches target is a valid one with traces? Or if not, do all references get cleaned up? For example if x2, x3, x4, x5 are all matching x and x is invalid and we make them all point to x2 but then x2 is invalid also do we then match them all to x3?

It does only search within valid axes. So this should not be a problem.
BTW it would be great to test the demo posted on the PR description with more combinations.

@alexcjohnson
Copy link
Collaborator

One thing this approach misses is if the lost axis sets an explicit range or rangemode https://codepen.io/alexcjohnson/pen/wvBNXgY?editors=0010
That seems like something we want to support, right?

@nicolaskruchten
Copy link
Contributor

Ah drat. Also categoryarray and any other axis-related option I would guess. That is a drawback to this approach: you need to copy everything over basically

@archmoj
Copy link
Contributor Author

archmoj commented Jan 23, 2020

Then, should x.range override x2.range if both specified?

@alexcjohnson
Copy link
Collaborator

should x.range override x2.range if both specified?

The answer to that is "exactly whatever would have happened if there was data on the xy subplot" - I don't know how we handle that though I'd guess that xaxis.range wins.

@archmoj
Copy link
Contributor Author

archmoj commented Jan 30, 2020

Closing in respect to #4529.

@archmoj archmoj closed this Jan 30, 2020
@archmoj archmoj deleted the fix4501-match-axes branch January 30, 2020 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Axis matching limitation
3 participants